<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<a href="index.html">作业一</a>
<a href="index00.html">作业二</a>
<a href="index01.html">作业三</a>
<a href="index02.html">作业四</a>
<a href="index03.html">作业五</a>
<script>
    var arr =  [18,38,123,56,90,173,52];
    var max = arr[0];
    var min = arr[0];
    var sum = 0;
    var avg = 0;
    for(var i = 1; i < arr.length; i++){
        if( max < arr[i] ){
            max = arr[i];
        }
        if( min > arr[i] ){
            min = arr[i];
        }
        sum += arr[i]
        avg = sum/(arr.length)

    }
    document.write('数组的最大值：'+max+'\n');
    document.write('数组的最小值：'+min+'\n');
    document.write('数组的平均值：'+avg+'\n');
    document.write('数组的和：'+sum);


</script>
</body>
</html>